home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / SDK / include / dopus / layout.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-26  |  16.5 KB  |  475 lines

  1. #ifndef _DOPUS_LAYOUT
  2. #define _DOPUS_LAYOUT
  3.  
  4. /*****************************************************************************
  5.  
  6.  Layout routines
  7.  
  8.  *****************************************************************************/
  9.  
  10. #ifndef LIBRARIES_GADTOOLS_H
  11. #include <libraries/gadtools.h>
  12. #endif
  13.  
  14. #define POS_CENTER        -1        // Center position
  15. #define POS_RIGHT_JUSTIFY    -2        // Right-justified
  16.  
  17. #define POS_MOUSE_CENTER    -3        // Center over mouse
  18. #define POS_MOUSE_REL        -4        // Relative to mouse
  19.  
  20. #define POS_PROPORTION        1024        // Proportion of space left
  21. #define POS_SQUARE        1124
  22. #define POS_REL_RIGHT        (1<<14)        // Relative to another
  23.  
  24. #define FPOS_TEXT_OFFSET    16384
  25.  
  26. #define SIZE_MAXIMUM        -1
  27. #define SIZE_MAX_LESS        -101
  28.  
  29. // Defines a window
  30. typedef struct {
  31.     struct IBox cw_CharDims;
  32.     struct IBox cw_FineDims;
  33. } ConfigWindow;
  34.  
  35. // Opens a window
  36. typedef struct {
  37.     void            *nw_Parent;        // Parent to open on
  38.     ConfigWindow        *nw_Dims;        // Window dimensions
  39.     char            *nw_Title;        // Window title
  40.     struct DOpusLocale    *nw_Locale;        // Locale to use
  41.     struct MsgPort        *nw_Port;        // Message port to use
  42.     ULONG            nw_Flags;        // Flags
  43.     struct TextFont        *nw_Font;        // Alternative font to use
  44. } NewConfigWindow;
  45.  
  46. // Set by the user
  47. #define WINDOW_SCREEN_PARENT    (1<<0)        // Parent is a screen
  48. #define WINDOW_NO_CLOSE        (1<<1)        // No close gadget
  49. #define WINDOW_NO_BORDER    (1<<2)        // No border
  50. #define WINDOW_LAYOUT_ADJUST    (1<<3)        // Adjust window size to fit objects
  51. #define WINDOW_SIMPLE        (1<<4)        // Simple refresh
  52. #define WINDOW_AUTO_REFRESH    (1<<5)        // Refresh window automatically
  53. #define WINDOW_AUTO_KEYS    (1<<6)        // Handle keys automatically
  54. #define WINDOW_OBJECT_PARENT    (1<<7)        // Parent is an existing object
  55. #define WINDOW_REQ_FILL        (1<<8)        // Backfill as a requester
  56. #define WINDOW_NO_ACTIVATE    (1<<9)        // Don't activate
  57. #define WINDOW_VISITOR        (1<<10)        // Open as visitor window
  58. #define WINDOW_SIZE_RIGHT    (1<<11)        // Size gadget, in right border
  59. #define WINDOW_SIZE_BOTTOM    (1<<12)        // Size gadget, in bottom border
  60. #define WINDOW_ICONIFY        (1<<13)        // Iconify gadget
  61.  
  62. // Set by the system
  63. #define OPEN_USED_DEFAULT    (1<<16)        // To open had to use default font
  64. #define OPEN_USED_TOPAZ        (1<<17)        // To open had to use topaz
  65. #define OPEN_SHRUNK_VERT    (1<<18)        // Window is not full vertical size requested
  66. #define OPEN_SHRUNK_HORIZ    (1<<19)        // Window is not full horizontal size requested
  67. #define OPEN_SHRUNK        (OPEN_SHRUNK_VERT|OPEN_SHRUNK_HORIZ)
  68.  
  69.  
  70. // ID of the iconify gadget
  71. #define GAD_ID_ICONIFY        0xffa0
  72.  
  73. // Defines an object
  74. typedef struct {
  75.     BYTE        od_Type;
  76.     UBYTE        od_ObjectKind;
  77.     struct IBox    od_CharDims;
  78.     struct IBox    od_FineDims;
  79.     ULONG        od_GadgetText;
  80.     ULONG        od_Flags;
  81.     USHORT        od_ID;
  82.     struct TagItem *od_TagList;
  83. } ObjectDef;
  84.  
  85. #define TEXTFLAG_TEXT_STRING        (1<<17)        // Text is a string, not a Locale ID
  86. #define TEXTFLAG_NO_USCORE        (1<<18)        // No underscore in text
  87.  
  88. #define BUTTONFLAG_IMMEDIATE        (1<<8)        // Instead of GA_Immediate
  89. #define BUTTONFLAG_OKAY_BUTTON        (1<<18)        // Button is an "ok" button
  90. #define BUTTONFLAG_CANCEL_BUTTON    (1<<19)        // Button is a "cancel" button
  91. #define BUTTONFLAG_TOGGLE_SELECT    (1<<20)        // Button is toggle-select
  92. #define BUTTONFLAG_THIN_BORDERS        (1<<22)        // Button has thin borders
  93.  
  94. #define LISTVIEWFLAG_CURSOR_KEYS    (1<<21)        // Lister responds to cursor
  95. #define FILEBUTFLAG_SAVE        (1<<21)        // Save mode
  96.  
  97. #define TEXTFLAG_ADJUST_TEXT        (1<<23)        // Adjust for text
  98. #define POSFLAG_ADJUST_POS_X        (1<<24)        // Position adjustor
  99. #define POSFLAG_ADJUST_POS_Y        (1<<25)        // Position adjustor
  100. #define POSFLAG_ALIGN_POS_X        (1<<26)        // Align
  101. #define POSFLAG_ALIGN_POS_Y        (1<<27)        // Align
  102.  
  103. #define TEXTFLAG_RIGHT_JUSTIFY        (1<<1)        // Right-justify text
  104. #define TEXTFLAG_CENTER            (1<<2)        // Center text
  105.  
  106. #define AREAFLAG_RAISED            (1<<8)        // Raised rectangle
  107. #define AREAFLAG_RECESSED        (1<<9)        // Recessed rectangle
  108. #define AREAFLAG_THIN            (1<<10)        // Thin borders
  109. #define AREAFLAG_ICON            (1<<11)        // Icon drop box
  110. #define AREAFLAG_ERASE            (1<<12)        // Erase interior
  111. #define AREAFLAG_LINE            (1<<13)        // Line (separator)
  112. #define AREAFLAG_OPTIM            (1<<15)        // Optimised refreshing
  113. #define AREAFLAG_TITLE            (1<<16)        // Box with a title
  114. #define AREAFLAG_NOFILL            (1<<18)        // No fill
  115.  
  116. #define OBJECTFLAG_DRAWN        (1<<31)        // Object has been drawn
  117.  
  118. #define OD_END        0        // End of a list
  119. #define OD_GADGET    1        // A gadget
  120. #define OD_TEXT        2        // Some text
  121. #define OD_AREA        3        // A rectangular area
  122. #define OD_IMAGE    4        // An image
  123. #define OD_SKIP        -1        // Skip this entry
  124.  
  125. typedef struct _GL_Object
  126. {
  127.     struct _GL_Object    *next;        // Next object
  128.     short            type;        // Type of object
  129.     char            key;        // Key equivalent
  130.  
  131.     unsigned char        flags2;        // Additional flags
  132.  
  133.     unsigned short        id;        // Object ID
  134.     unsigned short        control_id;    // Object that this controls
  135.     struct IBox        dims;        // Object dimensions
  136.     ULONG            flags;        // Object flags
  137.     char            *text;        // Text
  138.     USHORT            object_kind;    // Object kind
  139.  
  140.     union
  141.     {
  142.         struct _gl_gadget
  143.         {
  144.             struct Gadget *context;    // Context data for the gadget
  145.             struct Gadget *gadget;    // The gadget itself
  146.             int components;        // Number of component gadgets
  147.             LONG data;        // Some data for the gadget
  148.             short choice_max;    // Number of choices
  149.             short choice_min;    // Minimum choice
  150.             struct Image *image;    // Gadget image
  151.         } gl_gadget;
  152.  
  153.         struct _gl_text
  154.         {
  155.             struct IBox text_pos;    // Text position
  156.             WORD base_pos;        // Baseline position
  157.             short uscore_pos;    // Underscore position
  158.         } gl_text;
  159.  
  160.         struct _gl_area
  161.         {
  162.             struct IBox text_pos;    // Text position within area
  163.             struct IBox area_pos;    // Area position
  164.             int frametype;        // Frame type
  165.         } gl_area;
  166.  
  167.         struct _gl_image
  168.         {
  169.             struct IBox image_pos;    // Image position
  170.             struct Image *image;    // Image
  171.         } gl_image;
  172.     } gl_info;
  173.  
  174.     APTR memory;                // Any other memory
  175.  
  176.     char *original_text;            // Original text string
  177.     char fg,bg;                // Current pen colours
  178.  
  179.     ULONG    data_ptr;            // Pointer to other data
  180.  
  181.     struct TagItem    *tags;            // Copy of tags
  182.  
  183.     struct IBox char_dims;            // Original dimensions
  184.     struct IBox fine_dims;
  185. } GL_Object;
  186.  
  187. typedef struct _ObjectList {
  188.     GL_Object        *firstobject;    // First object
  189.     struct TextAttr        attr;        // Font used
  190.     struct Window        *window;    // Window used
  191.     struct _ObjectList    *next_list;    // Next list
  192. } ObjectList;
  193.  
  194. #define OBJECTF_NO_SELECT_NEXT    (1<<0)        // Don't select next field
  195. #define OBJECTF_PATH_FILTER    (1<<1)        // Filter path characters
  196. #define OBJECTF_SECURE        (1<<2)        // Hide string
  197. #define OBJECTF_INTEGER        (1<<3)        // Integer gadget
  198. #define OBJECTF_READ_ONLY    (1<<4)        // Read-only
  199. #define OBJECTF_HOTKEY        (1<<5)        // Hotkey string
  200.  
  201. typedef struct {
  202.     UBYTE    md_Type;            // Menu type
  203.     ULONG    md_ID;                // Menu ID
  204.     ULONG    md_Name;            // Menu name
  205.     ULONG    md_Flags;            // Menu flags
  206. } MenuData;
  207.  
  208. #define MENUFLAG_TEXT_STRING    (1<<16)        // Menu name is a real string
  209. #define MENUFLAG_COMM_SEQ    (1<<17)        // Give menu a command sequence
  210. #define MENUFLAG_AUTO_MUTEX    (1<<18)        // Automatic mutual exclusion
  211. #define MENUFLAG_USE_SEQ    (1<<19)        // Use command sequence supplied
  212.  
  213. #define MENUFLAG_MAKE_SEQ(c)    ((ULONG)(c)<<24)
  214. #define MENUFLAG_GET_SEQ(fl)    ((char)((fl)>>24))
  215.  
  216. #define NM_NEXT            10
  217. #define NM_BAR_LABEL    (ULONG)NM_BARLABEL
  218.  
  219. #define IS_GADTOOLS(obj)        (BOOL)(obj->gl_info.gl_gadget.context)
  220.  
  221. typedef struct
  222. {
  223.     ULONG            magic;        // Magic ID
  224.     struct Window        *window;    // Pointer back to window
  225.     ULONG            window_id;    // User window ID
  226.     struct MsgPort        *app_port;    // "Window's" application port
  227. } WindowID;
  228.  
  229. #define WINDOW_MAGIC        0x83224948
  230. #define WINDOW_UNKNOWN        (ULONG)-1
  231. #define WINDOW_UNDEFINED    0
  232.  
  233. #define SET_WINDOW_ID(w,id)    (((WindowID *)((w)->UserData))->window_id=(id))
  234.  
  235. // Window types
  236. #define WINDOW_BACKDROP            0x4000001
  237. #define WINDOW_LISTER            0x4000002
  238. #define WINDOW_BUTTONS            0x4000004
  239. #define WINDOW_GROUP            0x4000008
  240. #define WINDOW_LISTER_ICONS        0x4000010
  241. #define WINDOW_FUNCTION            0x4000020    // not really a window
  242. #define WINDOW_START            0x4000040
  243.  
  244. #define WINDOW_POPUP_MENU        0x0001200
  245. #define WINDOW_TEXT_VIEWER        0x0001300
  246.  
  247. #define WINDOW_USER            0x2000000
  248.  
  249. // This structure is pointed to by Window->UserData
  250. typedef struct
  251. typedef struct _WindowData
  252. {
  253.     WindowID        id;        // Window ID information
  254.  
  255.     ULONG            pad3;
  256.     struct FileRequester    *request;    // Window's file requester
  257.     APTR            visinfo;    // Visual info
  258.     struct DrawInfo        *drawinfo;    // Draw info
  259.     struct DOpusLocale    *locale;    // Locale info
  260.     struct MsgPort        *window_port;    // Window message port (if supplied)
  261.     struct NewMenu        *new_menu;    // NewMenu structure allocated
  262.     struct Menu        *menu_strip;    // Menu strip allocated
  263.     struct Requester    *busy_req;    // Window busy requester
  264.     ULONG            data;        // Window-specific data
  265.     ULONG            flags;        // Flags
  266.     APTR            memory;        // User memory chain, freed when window closes
  267.  
  268.     ULONG            pad;
  269.     struct FontRequester    *font_request;    // Window's font requester
  270.  
  271.     ULONG            userdata;
  272.     struct TagItem        *user_tags;
  273.  
  274.     struct List        boopsi_list;    // BOOPSI list
  275.  
  276.     struct Hook        *backfill;    // Backfill hook
  277.  
  278.     struct MinList        object_list;
  279. } WindowData;
  280.  
  281. #define FILE_GLASS_KIND    1000
  282. #define DIR_GLASS_KIND    1001
  283.  
  284. #define GM_RESIZE    (20)
  285.  
  286. struct gpResize
  287. {
  288.     ULONG            MethodID;
  289.     struct GadgetInfo    *gpr_GInfo;
  290.     struct RastPort        *gpr_RPort;
  291.     struct IBox        gpr_Size;
  292.     long            gpr_Redraw;
  293.     struct Window        *gpr_Window;
  294.     struct Requester    *gpr_Requester;
  295. };
  296.  
  297. // Custom tags
  298. #define GTCustom_LocaleLabels    TAG_USER + 0    // Points to list of Locale IDs
  299. #define GTCustom_Image        TAG_USER + 1    // Image for gadget
  300. #define GTCustom_CallBack    TAG_USER + 2    // Tag ID and data filled in by callback
  301. #define GTCustom_LayoutRel    TAG_USER + 3    // Layout relative to this object ID
  302. #define GTCustom_Control    TAG_USER + 4    // Controls another gadget
  303. #define GTCustom_TextAttr    TAG_USER + 6    // TextAttr to use
  304. #define GTCustom_MinMax        TAG_USER + 24    // Minimum and maximum bounds
  305. #define GTCustom_ThinBorders    TAG_USER + 27    // Gadget has thin borders
  306. #define GTCustom_LocaleKey    TAG_USER + 29    // Key from locale string
  307. #define GTCustom_NoSelectNext    TAG_USER + 31    // Don't select next field
  308. #define GTCustom_PathFilter    TAG_USER + 32    // Filter path characters
  309. #define GTCustom_History    TAG_USER + 33    // History
  310. #define GTCustom_CopyTags    TAG_USER + 34    // Copy tags
  311. #define GTCustom_FontPens    TAG_USER + 35    // Place to store pens and style
  312. #define GTCustom_FontPenCount    TAG_USER + 36    // Number of pens for font requester
  313. #define GTCustom_FontPenTable    TAG_USER + 37    // Table of pens for font requester
  314. #define GTCustom_Bold        TAG_USER + 38    // Bold pen
  315. #define GTCustom_Secure        TAG_USER + 39    // Secure string field
  316. #define GTCustom_Integer    TAG_USER + 40    // Integer gadget
  317. #define GTCustom_TextPlacement    TAG_USER + 41    // Position of text
  318. #define GTCustom_NoGhost    TAG_USER + 42    // Disable without ghosting
  319. #define GTCustom_Style        TAG_USER + 44    // Pen styles
  320. #define GTCustom_FrameFlags    TAG_USER + 45    // Frame flags
  321. #define GTCustom_ChangeSigTask    TAG_USER + 46    // Task to signal on change
  322. #define GTCustom_ChangeSigBit    TAG_USER + 47    // Signal bit to use
  323. #define GTCustom_LayoutPos    TAG_USER + 49    // Use with the POSFLAGs
  324. #define GTCustom_Borderless    TAG_USER + 50    // Borderless
  325. #define GTCustom_Justify    TAG_USER + 51    // Justification
  326.  
  327. #define LAYOUTF_SAME_HEIGHT    (1<<0)
  328. #define LAYOUTF_SAME_WIDTH    (1<<1)
  329. #define LAYOUTF_TOP_ALIGN    (1<<2)
  330. #define LAYOUTF_BOTTOM_ALIGN    (1<<3)
  331. #define LAYOUTF_LEFT_ALIGN    (1<<4)
  332. #define LAYOUTF_RIGHT_ALIGN    (1<<5)
  333.  
  334. #define JUSTIFY_LEFT        0
  335. #define JUSTIFY_RIGHT        1
  336. #define JUSTIFY_CENTER        2
  337.  
  338. #define DIA_Type        TAG_USER + 5    // Image type
  339. #define DIA_FrontPen        TAG_USER + 7    // Image front pen
  340.  
  341. #define IM_ARROW_UP    0
  342. #define IM_ARROW_DOWN    1
  343. #define IM_CHECK    2
  344. #define IM_DRAWER    3
  345. #define IM_BORDER_BOX    4
  346. #define IM_BBOX        5
  347. #define IM_ICONIFY    6
  348. #define IM_CROSS    7
  349. #define IM_LOCK        8
  350.  
  351. #define OPUS_LISTVIEW_KIND    127        // Custom listview gadget
  352. #define FILE_BUTTON_KIND    126        // File button gadget
  353. #define DIR_BUTTON_KIND        125        // Directory button gadget
  354. #define FONT_BUTTON_KIND    124        // Font button gadget
  355. #define FIELD_KIND        123        // Text field (no editing)
  356. #define FRAME_KIND        122        // Frame
  357. #define HOTKEY_KIND        121        // Hotkey field
  358.  
  359. // Listview tags
  360. #define DLV_TextAttr        TAG_USER + 6    // TextAttr to use
  361. #define DLV_ScrollUp        TAG_USER + 7        // Scroll list up
  362. #define DLV_ScrollDown        TAG_USER + 8        // Scroll list down
  363. #define DLV_SelectPrevious    TAG_USER + 11        // Select previous item
  364. #define DLV_SelectNext        TAG_USER + 12        // Select next item
  365. #define DLV_Labels        GTLV_Labels        // Labels
  366. #define DLV_Top            GTLV_Top        // Top item
  367. #define DLV_MakeVisible        GTLV_MakeVisible    // Make visible
  368. #define DLV_Selected        GTLV_Selected        // Selected
  369. #define DLV_ScrollWidth        GTLV_ScrollWidth    // Scroller width
  370. #define DLV_ShowSelected    GTLV_ShowSelected    // Show selected
  371. #define DLV_Check        TAG_USER + 10        // Check selection
  372. #define DLV_Highlight        TAG_USER + 14        // Highlight selection
  373. #define DLV_MultiSelect        TAG_USER + 9        // Multi-selection
  374. #define DLV_ReadOnly        GTLV_ReadOnly        // Read only
  375. #define DLV_Lines        TAG_USER + 13        // Visible lines (get only)
  376. #define DLV_ShowChecks        TAG_USER + 15        // Show checkmarks
  377. #define DLV_Flags        TAG_USER + 16        // Layout flags
  378. #define DLV_NoScroller        TAG_USER + 17        // No scroller necessary
  379. #define DLV_TopJustify        TAG_USER + 18        // Top-justify items
  380. #define DLV_RightJustify    TAG_USER + 19        // Right-justify items
  381. #define DLV_DragNotify        TAG_USER + 20        // Notify of drags
  382. #define DLV_GetLine        TAG_USER + 25        // Get line from coordinate
  383. #define DLV_DrawLine        TAG_USER + 26        // Draw a line from the listview
  384. #define DLV_Object        TAG_USER + 27        // Pointer to object
  385. #define DLV_DoubleClick        TAG_USER + 28        // Indicates double-click
  386. #define DLV_ShowFilenames    TAG_USER + 48        // Show filenames only
  387.  
  388. typedef struct
  389. {
  390.     struct RastPort        *rp;
  391.     struct DrawInfo        *drawinfo;
  392.     struct Node        *node;
  393.     unsigned short        line;
  394.     struct IBox        box;
  395. } ListViewDraw;
  396.  
  397. // Listview node data
  398. #define lve_Flags        ln_Type            // Listview entry flags
  399. #define lve_Pen            ln_Pri            // Listview entry pen
  400. #define LVEF_SELECTED        (1<<0)            // Entry is selected
  401. #define LVEF_USE_PEN        (1<<1)            // Use pen to render entry
  402. #define LVEF_TEMP        (1<<2)            // Temporary flag for something
  403.  
  404. // File button tags
  405. #define DFB_DefPath        TAG_USER + 19        // Default path
  406.  
  407. // Palette tags
  408. #define DPG_Pen            TAG_USER + 21        // Ordinal selected pen
  409. #define DPG_SelectPrevious    TAG_USER + 22        // Select previous pen
  410. #define DPG_SelectNext        TAG_USER + 23        // Select next pen
  411.  
  412. // Some useful macros
  413. #define GADGET(obj) (obj->gl_info.gl_gadget.gadget)
  414. #define AREA(obj) obj->gl_info.gl_area
  415. #define DATA(win) ((WindowData *)win->UserData)
  416. #define WINFLAG(win) (DATA(win)->flags)
  417. #define WINMEMORY(win) (DATA(win)->memory)
  418. #define WINREQUESTER(win) (DATA(win)->request)
  419. #define OBJLIST(win) (DATA(win)->list)
  420. #define DRAWINFO(win) (DATA(win)->drawinfo)
  421. #define VISINFO(win) (DATA(win)->visinfo)
  422. #define GADSPECIAL(list,id) (GADGET(L_GetObject(list,id))->SpecialInfo)
  423. #define GADSTRING(list,id) ((struct StringInfo *)GADSPECIAL(list,id))->Buffer
  424. #define GADNUMBER(list,id) ((struct StringInfo *)GADSPECIAL(list,id))->LongInt
  425. #define GADSEL(list,id) (GADGET(L_GetObject(list,id))->Flags&GFLG_SELECTED)
  426. #define GADGET_SPECIAL(list,id) (GADGET(GetObject(list,id))->SpecialInfo)
  427. #define GADGET_STRING(list,id) ((struct StringInfo *)GADGET_SPECIAL(list,id))->Buffer
  428. #define GADGET_NUMBER(list,id) ((struct StringInfo *)GADGET_SPECIAL(list,id))->LongInt
  429. #define GADGET_SEL(list,id) (GADGET(GetObject(list,id))->Flags&GFLG_SELECTED)
  430. #define CFGDATA(win) (((WindowData *)win->UserData)->data)
  431.  
  432. #define MENUID(menu) ((ULONG)GTMENUITEM_USERDATA(menu))
  433.  
  434. // Layout functions
  435. struct Window *OpenConfigWindow(NewConfigWindow *);
  436. void CloseConfigWindow(struct Window *);
  437.  
  438. struct IntuiMessage *GetWindowMsg(struct MsgPort *);
  439. void ReplyWindowMsg(struct IntuiMessage *);
  440.  
  441. ObjectList *AddObjectList(struct Window *,ObjectDef *);
  442. void FreeObjectList(ObjectList *);
  443. GL_Object *GetObject(ObjectList *,ULONG);
  444. void SetGadgetValue(ObjectList *,USHORT,ULONG);
  445. long GetGadgetValue(ObjectList *,USHORT);
  446. void SetGadgetChoices(ObjectList *list,ULONG id,APTR choices);
  447. BOOL CheckObjectArea(GL_Object *,long,long);
  448. void DisableObject(ObjectList *,ULONG,BOOL);
  449.  
  450. void DisplayObject(struct Window *,GL_Object *,long,long,char *);
  451. void SetWindowBusy(struct Window *);
  452. void ClearWindowBusy(struct Window *);
  453. long BoundsCheckGadget(ObjectList *,ULONG,long,long);
  454. BOOL GetObjectRect(ObjectList *,ULONG,struct Rectangle *);
  455. void SetConfigWindowLimits(struct Window *,ConfigWindow *,ConfigWindow *);
  456. void LayoutResize(struct Window *);
  457.  
  458. void AddWindowMenus(struct Window *,MenuData *);
  459. void FreeWindowMenus(struct Window *);
  460.  
  461. void StartRefreshConfigWindow(struct Window *,long);
  462. void EndRefreshConfigWindow(struct Window *);
  463.  
  464. struct Menu *BuildMenuStrip(MenuData *,struct DOpusLocale *);
  465. struct MenuItem *FindMenuItem(struct Menu *,USHORT);
  466. void SetWindowID(struct Window *,WindowID *,ULONG,struct MsgPort *);
  467. ULONG GetWindowID(struct Window *);
  468. struct MsgPort *GetWindowAppPort(struct Window *);
  469.  
  470.  
  471. #define RECTWIDTH(rect)        (1+(rect)->MaxX-(rect)->MinX)
  472. #define RECTHEIGHT(rect)    (1+(rect)->MaxY-(rect)->MinY)
  473.  
  474. #endif
  475.